package com.hsp.exception_;

public class NumberFormatException_ {
    private static String name;

    public static void main(String[] args) {
        String name = "w1234";

        //将String转成 int
        //抛出NumberFormatException
        int num = 0;
        try {
            num = Integer.parseInt(name);
        } catch (NumberFormatException e) {
            throw new RuntimeException(e);
        }
        System.out.println(num);

    }
}
